<?
if($_POST){
$filename=$_POST["filename"];
$filenamePath="images/events/".$_POST["event_id"]."/".$filename;
$img = file_get_contents($_POST["img_url"]);

file_put_contents($filenamePath, $img );  

}
?>
<form method="post">
Filename <input type="text" name="filename">
Image Url <input type="text" name="img_url">
Event Number <input type="text" name="event_id">
<input type="submit" value="Load Image" />
</form>